<template>
    <div>
        <header class="header_array_search_red header_array_search_white mint-header">
			<div class="mint-header-button is-left">
				<a href="javascript:void(0)" class="router-link-active" @click="gotoback">
                    <button class="mint-button mint-button--default mint-button--normal">
                        <span class="mint-button-icon">
                            <!-- <i class="mintui mintui-back"></i> -->
                            <i class="iconfont icon-back_icon icon_white"></i>
                        </span> 
                    </button>
				</a>
			</div> 
			<h1 class="mint-header-title title_white">{{title}}</h1> 
            <div class="mint-header-button">
				<a href="javascript:void(0)" class="router-link-active" @click="gotobtn">
					<button class="mint-button mint-button--default mint-button--normal">
						<!-- <label class="mint-button-text">{{settext}}</label> -->
                        <i class="iconfont icon-sousuo icon_white" v-if="searchBack"></i>
                        <i class="iconfont icon-transmit_icon icon_white transmiticon" v-if="noBack"></i>
                        <!-- :noBack="true"(搜索图标出现) :noBack="false"(两个图标出现)  :searchBack="true"(分享图标出现)-->
                        <i class="iconfont icon-gengduo" v-if="share"></i>
                        <i class="iconfont icon-jia" v-if="addto"></i>
					</button>
				</a>
			</div>
		</header>
    </div>
</template>

<script>
    export default {
        data() {
            return {
            }
        },
        methods: {
            gotoback() {
                if(this.backFn){
                    this.backFn();
                }else {
                    if(this.$router){
                        this.$router.back();
                    }else {
                        window.history.back();
                    }
                }
            },
            gotobtn() {
                this.$emit('done');
            }
        },
        props: ['title', 'backFn', 'settext', 'done', 'searchBack', 'noBack', 'share', 'addto']
    }
</script>